package cn.gailvlun.gll.presentation.emotion

import android.view.View
import cn.gailvlun.gll.R
import cn.gailvlun.gll.net.base.Profile
import cn.gailvlun.gll.net.emotion.Emotion
import cn.gailvlun.gll.net.emotion.EmotionTag
import cn.gailvlun.gll.presentation.base.BaseActivity
import cn.gailvlun.gll.presentation.emotion.core.BaseAdapter
import cn.gailvlun.gll.presentation.emotion.core.BaseViewModel



class EmotionSameListViewModel : BaseViewModel {

    override var mActivity: BaseActivity
    private val mParentView: View

    constructor(activity: BaseActivity, adapter: BaseAdapter<Any>) : super(activity, adapter) {
        mActivity = activity
        mParentView = layoutInflater.inflate(R.layout.activity_emotion_same_list, null)
        initPopWindow(mParentView)
    }

    fun jump2Profile(emotion: Emotion) {
        super.baseJump2Profile(emotion.owner)
    }

    fun jump2Profile(profile: Profile) {
        super.baseJump2Profile(profile)
    }





    fun toEmotionDetail(emotion: Emotion) {
        super.baseToEmotionDetail(emotion)
    }

    fun showOperateEmotionWindow(view: View, emotion: Emotion) {
        super.baseShowOperateEmotionWindow(mParentView, emotion)
    }

    fun showFunction(anchor: View, emotion: Emotion) {
        super.baseShowFunction(anchor, emotion)
    }

    fun getEmotionTagCreator(emotionTag: EmotionTag): String {
        return "由 ${emotionTag.owner.name} 创建"
    }
}